package com.future.base;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.compass.annotations.SearchableId;
import org.compass.annotations.SearchableProperty;
import org.compass.annotations.Store;

/**
 * @filename      : BaseEntity.java
 * @description   : TODO(一句话描述该类做什么)
 * @author        : wanghongkai
 * @create        : 2013-6-17 下午4:29:06
 * @copyright     : hileto Corporation 2013
 *
 * Modification History:
 * Date             Author       Version
 * --------------------------------------
 * d2013-6-17 下午4:29:06
 */
@MappedSuperclass
public class BaseEntity implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	private Long id;	//主键id
	private Date createDate;	//创建日期
	private Date modifyDate;	//修改日期
	
	@SearchableId
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId()
	{
		return id;
	}
	public void setId(Long id)
	{
		this.id = id;
	}
	
	@SearchableProperty(store = Store.YES)
	@Column(updatable = false)
	public Date getCreateDate()
	{
		return createDate;
	}
	public void setCreateDate(Date createDate)
	{
		this.createDate = createDate;
	}
	
	@SearchableProperty(store = Store.YES)
	public Date getModifyDate()
	{
		return modifyDate;
	}
	public void setModifyDate(Date modifyDate)
	{
		this.modifyDate = modifyDate;
	}
}
